﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Functions_Default"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="Company.StudyClub.BLL.Common" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="<%= Utility.Source %>/css/common.css" rel="stylesheet" type="text/css" />
    <link href="<%= Utility.Source %>/css/management.css" rel="stylesheet" type="text/css" />
    <link href="<%= Utility.Source %>/css/facebox.css" rel="stylesheet" type="text/css" />
    <script src="<%= Utility.Source %>/js/jquery.js" type="text/javascript"></script>
    <script src="<%= Utility.Source %>/js/facebox.js" type="text/javascript"></script>
    <script src="<%= Utility.Source %>/js/common.js" type="text/javascript"></script>
    <script type="text/javascript">        
        var rootpath = '<%= FilePath("") %>';
        $(function() {
            formReady();
        });
    </script>  
</head>
<body class="adminBody">   
    <form id="form1" runat="server">
    <div class="adminMainContent">        
        <div class="DG" style="margin-top:10px;">
	        <table cellspacing="0" >
    	        <tr>
    	          <th width="5%">GroupID</th>
       	          <th width="10%">GroupName</th>
       	          <th width="10%">GroupOrder</th>
                  <th width="10%">SectionID</th>
                  <th width="10%">SectionName</th>
                  <th width="10%">操作</th>
                </tr>
                <asp:Repeater ID="rpt_GroupList" runat="server" OnItemCommand="rpt_GroupList_ItemCommand" OnItemDataBound ="rpt_GroupList_ItemDataBound">
                    <ItemTemplate>
                        <tr class="tdmover">
                            <td><asp:Literal ID="lit_GroupID" runat="server" Text='<%# Eval("FunctionID") %>'></asp:Literal></td>
	                        <td><asp:TextBox ID="txt_GroupName" runat="server" Text='<%# Eval("FunctionName") %>'></asp:TextBox></td>
	                        <td><asp:TextBox ID="txt_GroupOrder" runat="server" Text='<%# Eval("OrderNum") %>'></asp:TextBox></td>
	                        <td><asp:TextBox ID="txt_SectionID" runat="server" Text='<%# Eval("SectionID") %>'></asp:TextBox></td>
	                        <td><asp:TextBox ID="txt_SectionName" runat="server" Text='<%# Eval("SectionName") %>'></asp:TextBox></td>
	                        <td>
	                            <asp:LinkButton ID="lbtn_Edit" runat="server" Text="修改" CommandName="Edit" CommandArgument='<%# Eval("FunctionID") %>'></asp:LinkButton>
	                            <asp:LinkButton ID="lbtn_Delete" runat="server" Text="删除" CommandName="Delete" OnClientClick="return confirm('确认删除吗？');" CommandArgument='<%# Eval("FunctionID") %>'></asp:LinkButton>
	                        </td>
	                    </tr>
	                    <tr>
	                        <td colspan="6">
	                            <table>
                                    <tr>
                                        <th width="5%">FunctionID</th>
                                        <th width="10%">Group</th>
                                        <th width="10%">FunctionName</th>
                                        <th width="10%">AreaName</th>
                                        <th width="10%">EnterUrl</th>
                                        <th width="10%">OrderNum</th>
                                        <th width="10%">操作</th>
                                    </tr>
                            <asp:Repeater ID="rpt_FunctionList" runat="server" OnItemCommand="rpt_FunctionList_ItemCommand" OnItemDataBound="rpt_FunctionList_ItemDataBound">
                                <ItemTemplate>
                                    <tr>
                                        <td><asp:Literal ID="lit_FunctionID" runat="server" Text='<%# Eval("FunctionID") %>'></asp:Literal></td>
                                        <td><asp:DropDownList ID="ddl_GroupID" runat="server" Width="95%" ></asp:DropDownList><input type="hidden" id="hid_GroupID" runat="server" value='<%# Eval("ParentID") %>' /></td>
                                        <td><asp:TextBox ID="txt_FunctionName" runat="server" Text='<%# Eval("FunctionName") %>' Width="95%" ></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_AreaName" runat="server" Text='<%# Eval("Area") %>' Width="150px" ></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_EnterUrl" runat="server" Text='<%# Eval("EnterUrl") %>' Width="90px" ></asp:TextBox></td>
                                        <td><asp:TextBox ID="txt_OrderNum" runat="server" Text='<%# Eval("OrderNum") %>' Width="95%" ></asp:TextBox></td>
                                        <td>
	                                        <asp:LinkButton ID="lbtn_Edit" runat="server" Text="修改" CommandName="Edit" CommandArgument='<%# Eval("FunctionID") %>'></asp:LinkButton>
                                            <asp:LinkButton ID="lbtn_Delete" runat="server" Text="删除" CommandName="Delete" CommandArgument='<%# Eval("FunctionID") %>' OnClientClick="return confirm('确认删除吗？');"></asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                                    <tr>
                                        <td>添加功能</td>
                                        <td><asp:DropDownList ID="ddl_NewG" runat="server"/></td>
                                        <td><asp:TextBox ID="txt_NewFunctionName" runat="server" Width="95%" /></td>
                                        <td><asp:TextBox ID="txt_NewArea" runat="server" Width="95%" /></td>
                                        <td><asp:TextBox ID="txt_NewEnterUrl" runat="server" Width="95%" /></td>
                                        <td><asp:TextBox ID="txt_NewFunctionOrder" runat="server" Width="95%" /></td>
                                        <td><asp:Button ID="btn_AddF" runat="server" Text="添加" CommandName="Add" class="btn"/></td>
                                    </tr>
	                            </table>
	                        </td>
	                    </tr>
	                </ItemTemplate>
	            </asp:Repeater>
                <tr class="tdmover">
                    <td>添加组</td>
                    <td><asp:TextBox ID="txt_NewGroupName" runat="server"/></td>
                    <td><asp:TextBox ID="txt_NewGroupOrder" runat="server"></asp:TextBox></td>
                    <td><asp:TextBox ID="txt_NewSectionID" runat="server"/></td>
                    <td><asp:TextBox ID="txt_NewSectionName" runat="server"/></td>
                    <td><asp:Button ID="btn_AddF" runat="server" Text="添加" onclick="btn_AddF_Click" class="btn" /></td>
                </tr>
            </table>
        </div>
    </div>      
    </form>   
</body>
</html>


